package com.test.java.java8;

import java.util.ArrayList;
import java.util.List;

public class reduce {

    public static void main(String[] args) {
        List<Integer> nums=new ArrayList<>();
        nums.add(5);
        nums.add(6);
        nums.add(30);
        Integer reduce = nums.stream().reduce(1, (a,b)->a*b);
        System.out.println(reduce);

    }
}
